import { Rule } from "./types";

export const Flake8UsePathlibRuleList: Rule[] = [
    {
        code: "PTH100",
        name: "os-path-abspath",
        descEn: "os.path.abspath() should be replaced by Path.resolve()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH101",
        name: "os-chmod",
        descEn: "os.chmod() should be replaced by Path.chmod()	",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH102",
        name: "os-mkdir",
        descEn: "os.mkdir() should be replaced by Path.mkdir()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH103",
        name: "os-makedirs",
        descEn: "os.makedirs() should be replaced by Path.mkdir(parents=True)",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH104",
        name: "os-rename",
        descEn: "os.rename() should be replaced by Path.rename()	",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH105",
        name: "pathlib-replace",
        descEn: "os.replace() should be replaced by Path.replace()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH106",
        name: "os-rmdir",
        descEn: "os.rmdir() should be replaced by Path.rmdir()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH107",
        name: "os-remove",
        descEn: "os.remove() should be replaced by Path.unlink()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH108",
        name: "os-unlink",
        descEn: "os.unlink() should be replaced by Path.unlink()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH109",
        name: "os-getcwd",
        descEn: "os.getcwd() should be replaced by Path.cwd()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH110",
        name: "os-path-exists",
        descEn: "os.path.exists() should be replaced by Path.exists()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH111",
        name: "os-path-expanduser",
        descEn: "os.path.expanduser() should be replaced by Path.expanduser()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH112",
        name: "os-path-isdir",
        descEn: "os.path.isdir() should be replaced by Path.is_dir()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH113",
        name: "os-path-isfile",
        descEn: "os.path.isfile() should be replaced by Path.is_file()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH114",
        name: "os-path-islink",
        descEn: "os.path.islink() should be replaced by Path.is_symlink()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH115",
        name: "os-readlink",
        descEn: "os.readlink() should be replaced by Path.readlink()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH116",
        name: "os-stat",
        descEn: "os.stat() should be replaced by Path.stat(), Path.owner(), or Path.group()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH117",
        name: "os-path-isabs",
        descEn: "os.path.isabs() should be replaced by Path.is_absolute()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH118",
        name: "os-path-join",
        descEn: "os.path.join() should be replaced by Path with / operator",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH119",
        name: "os-path-basename",
        descEn: "os.path.basename() should be replaced by Path.name",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH120",
        name: "os-path-dirname",
        descEn: "os.path.dirname() should be replaced by Path.parent",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH121",
        name: "os-path-samefile",
        descEn: "os.path.samefile() should be replaced by Path.samefile()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH122",
        name: "os-path-splitext",
        descEn: "os.path.splitext() should be replaced by Path.suffix",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH123",
        name: "builtin-open",
        descEn: "open() should be replaced by Path.open()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "PTH124",
        name: "py-path",
        descEn: "py.path is in maintenance mode, use pathlib instead",
        descCn: "",
        autoFix: false,
    },
];